﻿namespace SuperMarieApi.App.Controllers.Framework.Config.Logging
{
    using System.Configuration;

    public class LoggingConfig : ConfigurationSection
    {
        [ConfigurationProperty("appName", IsRequired = true)]
        public string AppName
        {
            get
            {
                return base["appName"] as string;
            }
            set
            {
                base["appName"] = value;
            }
        }

        [ConfigurationProperty("moduleName", IsRequired = true)]
        public string ModuleName
        {
            get
            {
                return base["moduleName"] as string;
            }
            set
            {
                base["moduleName"] = value;
            }
        }

        [ConfigurationProperty("logDatabaseName", IsRequired = true)]
        public string LogDatabaseName
        {
            get
            {
                return base["logDatabaseName"] as string;
            }
            set
            {
                base["logDatabaseName"] = value;
            }
        }

        [ConfigurationProperty("enabled", IsRequired = true)]
        public bool Enabled
        {
            get
            {
                return (bool)base["enabled"];
            }
            set
            {
                base["enabled"] = value;
            }
        }
    }
}
